<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const grid = [
        [2, 3], [3, 4], [4, 5], [5, 6], [6, 7],
        [4, 6], [5, 5], [4, 4], [5, 4], [5, 5],
    ];
    const gridMap = new Map([
        ['1+2', [2, 3]],
        ['1+3', [3, 4]],
        ['1+4', [4, 5]],
        ['1+5', [5, 6]],
        ['1+7', [6, 7]],

        ['1+8', [4, 6]],
        ['1+9', [5, 5]],
        ['1+12', [4, 4]],
        ['1+16', [5, 4]],
        ['4+9', [5, 5]],
    ]);

    for (const [key, value] of gridMap.entries()) {
        console.log(next)
    }

</script>
</body>
</html>